import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import HelloWorld from '../components/HelloWorld.vue'
import Product from '../components/Product.vue'
import Shop from '../components/Shop.vue'
import System from '../views/system/index.vue'
import LoadingVue from '../components/Loading.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'HelloWorld',
    component: HelloWorld,
  },
  {
    path: '/product',
    name: 'Product',
    component: Product,
  },
  {
    path: '/shop',
    name: 'Shop',
    component: Shop,
  },
  {
    path: '/loading',
    name: 'Loading',
    component: LoadingVue,
  },
  // 这里可以添加其他路由
  {
    path: '/system',
    name: 'System',
    component: System,
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router
